/**
 * @module vue-demo
 * @desc 列表-列表展示
 * @author ervinewell on 2017/4/7.
 */

import * as types from '../types';
import * as mockData from '$mock';

export default {
  state: {
    list: [],
    loading: true,
  },
  actions: {
    [types.GET_LIST]({ state }) {
      state.loading = true;
      setTimeout(() => {
        state.list = mockData.LIST;
        state.loading = false;
      }, 1000);
    },
  },
};
